<?php
include("../inc/Function.php");
if($_SESSION['a']['alevel']!=5 && $power['twsc']!=1){
	echo "<script>alert('权限不足');window.location.href='index.php';</script>";exit;
}
$page = isset($_GET['page'])?intval($_GET['page']):1;
$cid = isset($_GET['cid'])?intval($_GET['cid']):0;
$psize = 15;
$list = newslist($page,$psize,$cid);
$num = newslistnum($cid);
if($list){
    $msg = 1;
}else{
    $msg = 0;
}
$page1 = page1($num,$psize,$page,$_SERVER['PHP_SELF']."?cid=$cid");
$tpl->assign('page1',$page1);
$tpl->assign('page',$page);
$tpl->assign('cid',$cid);
$tpl->assign('msg',$msg);
$tpl->assign('nlist',$list);
$tpl->show('newslist');
?>